package com.iule.common.playboy.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.iule.common.playboy.mapper.ControlConfigMapper;
import com.iule.common.playboy.service.ConfigCoreService;
import com.iule.common.playboy.utils.JSONSql;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author 柚子
 * @date {2020/3/16}
 */
@Service
public class ConfigCoreServiceImpl implements ConfigCoreService {


    private final ControlConfigMapper controlConfigMapper;

    @Autowired
    public ConfigCoreServiceImpl(ControlConfigMapper controlConfigMapper) {
        this.controlConfigMapper = controlConfigMapper;
    }

    @Override
    public Object getNewestConfig(String key, JSONObject conditions) {
        JSONSql jsonSql = new JSONSql();
        jsonSql.eq("channel","vivo");
        System.out.println(controlConfigMapper.doExecuteQuerySql(jsonSql.toString()));
        return null;
    }

    @Override
    public List<Object> getConfigs(JSONObject conditions, String... key) {
        return null;
    }

}
